﻿@using SW.Lite.Core.Extensions
@{
    Layout = "~/Areas/Master/Views/Shared/_Layout.cshtml";
}
@section Header{
    <script type="text/javascript">
        function add() {
            location.href = '@Url.Action("AddStep1")';
        }
    </script>
}
<div class="panel grid_8">
    <div class="panel-header">
        <span class="i-24 i-user">模型管理</span>
    </div>
    <div class="panel-body">
        <div class="panel-toolbar top clearfix">
            <ul>
                <li><a id="btnAdd" class="ic-16 ic-add" onclick="add();">添加</a></li>
                <li><a id="btnAdd" class="ic-16 ic-edit" onclick="edit();">编辑</a></li>
            </ul>
        </div>
        <div class="dataTables_wrapper">
            <table class="datatable-fn table">
                <thead>
                    <tr>
                        <th style="width: 30px;"><input type="checkbox" onchange="Utils.checkAll(this.checked);" /></th>
                        <th style="width: 200px;">模型编码</th>
                        <th style="width: auto;">模型名称</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var item in Model)
                    {
                        <tr>
                            <td class="center"><input class="cboItem" type="checkbox" value="@item.Id" /></td>
                            <td class="center">@item.Code</td>
                            <td class="center">@item.Title</td>
                        </tr>
                    }
                </tbody>
            </table>
            <div class="dataTables_paginate paging_full_numbers">
                <span>
                    @Html.Pager(20, (int)ViewBag.RecordCount)
                </span>
            </div>
        </div>
    </div>
</div>
<div id="addDialog" class="hide">
    <div class="form-inline form">
        <div class="form-row">
            <label>模型编码</label>
            <div class="form-item large">
                <input id="Code" class="textinput" type="text" /><input type="hidden" id="ID" />
            </div>
        </div>
        <div class="form-row">
            <label>模型名称</label>
            <div class="form-item large">
                <input id="Title" class="textinput" type="text" />
            </div>
        </div>
    </div>
</div>